#! /bin/bash
export LANG=en_US.UTF-8

jar_file=`ps aux|grep $*|grep -v grep|awk '{for(i=1;i<=NF;++i){if(index($i,".jar")>=1){print $i}}}'|awk -F ':' '{for(i=1;i<NF;++i){if(index($i,".jar")>1){if(index($i,"kafka")>=1){print $i}}}}'|head -1`
lib_path=`dirname $jar_file`
cd $lib_path/../
echo `pwd`/